<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app"></div>
  <button id="btn1">增加</button>
</body>
<script src="./index.global.js"></script>
<script>
  const {effect, ref} = VueReactivity;
  const count = ref(10);
  
  function renderer(domString, container){
    container.innerHTML = domString;
  }

  effect(()=>{
    renderer(`<h1>${count.value}</h1>`, document.getElementById('app'));
  })

  btn1.addEventListener('click', ()=>{
    count.value++;
  })
</script>
</html>